<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <h3>行为日志</h3>

    <div class="btn-group m-b-sm" role="group">
        <button class="btn btn-default ajax-get confirm" url="{:U('clear')}">清 空</button>
        <button class="btn btn-default ajax-post confirm" target-form="ids" url="{:U('remove')}">删 除</button>
    </div>
    <!-- 数据列表 -->
    <div class="panel-body panel panel-default">
        <table class="table table-hover table-striped">
            <thead>
                <tr>
                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                    <th class="">编号</th>
                    <th class="">行为名称</th>
                    <th class="">执行者</th>
                    <th class="">执行时间</th>
                    <th class="">操作</th>
                </tr>
            </thead>
            <tbody>
            <notempty name="_list">
                <volist name="_list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
                        <td>{$vo.id} </td>
                        <td>{:get_action($vo['action_id'],'title')}</td>
                        <td>{:get_nickname($vo['user_id'])}</td>
                        <td><span>{$vo.create_time|time_format}</span></td>
                        <td><a href="{:U('Action/edit?id='.$vo['id'])}">详细</a>
                            <a class="confirm ajax-get" href="{:U('Action/remove?ids='.$vo['id'])}">删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>

        <!-- 分页 -->
        <p class="page">{$_page}</p>
        <!-- /分页 -->
    </div>
</block>
<block name="script">
    <script type="text/javascript">
        $(function () {
            $("#action_add").click(function () {
                window.location.href = $(this).attr('url');
            })
        })
    </script>
</block>
